Skip to content

test: stabilize dapp-interactions E2E tab targeting and add stress workflow#40512

Draft
davidmurdoch wants to merge 24 commits intomainfrom
chore/dapp-interactions-flake-stress
Draft

test: stabilize dapp-interactions E2E tab targeting and add stress workflow#40512
davidmurdoch wants to merge 24 commits intomainfrom
chore/dapp-interactions-flake-stress

Conversation

@davidmurdoch
Copy link
Contributor

@davidmurdoch davidmurdoch commented Feb 28, 2026

Description

This PR addresses a flaky E2E failure in dapp-interactions.spec.ts by removing ambiguous title-based tab switching in a multi-dapp scenario.

In should connect a second Dapp despite MetaMask being locked, we now switch back to the second dapp by URL (DAPP_ONE_URL) instead of title (E2E Test Dapp), which can match multiple tabs.

This PR also adds a dedicated stress workflow that runs only this spec repeatedly (default 30 attempts) and fails on the first flaky occurrence.

Open in GitHub Codespaces

Changelog

CHANGELOG entry: null

Related issues

Fixes:

Manual testing steps

  1. Checkout this branch and run linting for changed files:
    yarn lint:changed:fix
  2. Trigger the stress workflow (Actions -> E2E Dapp Interactions Stress) with default attempts, or run:
    gh workflow run e2e-dapp-interactions-stress.yml --ref chore/dapp-interactions-flake-stress -f attempts=30
  3. Confirm the workflow runs only test/e2e/tests/dapp-interactions/dapp-interactions.spec.ts and passes all repeated attempts.

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added the team-extension-platform Extension Platform team label Feb 28, 2026
@davidmurdoch davidmurdoch changed the title Stabilize dapp-interactions E2E tab targeting and add stress workflow test: stabilize dapp-interactions E2E tab targeting and add stress workflow Feb 28, 2026
@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Feb 28, 2026

Builds ready [bf69cd8]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account2762762760276276
total2762762760276276
Confirm Txconfirm_tx604660446049260486049
total604660446049260486049
Bridge User Actionsbridge_load_page25118932048287320
bridge_load_asset_picker1991882057205205
bridge_search_token72470174918735749
total1190108712748012611274
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Standard HomeuiStartup13921183193111514271608
load117198815539312011352
domContentLoaded116598615459211961345
domInteractive2816124202480
firstPaint157691150121206268
backgroundConnect20719227312209233
firstReactRender20127582028
initialActions107114
loadScripts97378913489310051157
setupStore1263451421
numNetworkReqs312292192283
Power User HomeuiStartup17521381230216318082087
load11671049176114611521546
domContentLoaded11531036174214311411537
domInteractive37181652634101
firstPaint1818143983248305
backgroundConnect29926442927306351
firstReactRender24164872637
initialActions108113
loadScripts93683215261429171328
setupStore1684161827
numNetworkReqs57361602456118
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2172162191218219
srpButtonToSrpForm92919529295
confirmSrpToPwForm21212102121
pwFormToMetricsScreen15151601616
metricsToWalletReadyScreen16151711717
doneButtonToHomeScreen911583141935012401419
openAccountMenuToAccountListLoaded74556833808852980868088
total87318002917941390459179
Onboarding New WalletcreateWalletToSocialScreen2212182252222225
srpButtonToPwForm1091041133112113
createPwToRecoveryScreen98101910
skipBackupToMetricsScreen38354023940
agreeButtonToOnboardingSuccess17151811818
doneButtonToAssetList945618142828811011428
total1338999181929015031819
Asset DetailsassetClickToPriceChart554181166581
total554181166581
Solana Asset DetailsassetClickToPriceChart46454714647
total46454714647
Import Srp HomeloginToHomeScreen2060195921606720882160
openAccountMenuAfterLogin43384634646
homeAfterImportWithNewWallet22091967241317123682413
total43124082450215944794502
Send TransactionsopenSendPageFromHome301740104040
selectTokenToSendFormLoaded21182632226
reviewTransactionToConfirmationPage8608468709866870
total9118989249917924
SwapopenSwapPageFromHome13511716419138164
fetchAndDisplaySwapQuotes4606457246372446154637
total4711464647564647544756
🌐 Dapp Page Load Benchmarks

Current Commit: bf69cd8 | Date: 2/28/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±42ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 731ms (±38ms) 🟢 | historical mean value: 739ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 79ms (±11ms) 🟢 | historical mean value: 83ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 42ms 1.02s 1.34s 1.08s 1.34s
domContentLoaded 731ms 38ms 711ms 1.01s 762ms 1.01s
firstPaint 79ms 11ms 64ms 176ms 88ms 176ms
firstContentfulPaint 79ms 11ms 64ms 176ms 88ms 176ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs
  • background: 58 Bytes (0%)
  • ui: 5 Bytes (0%)
  • common: 20 Bytes (0%)

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Feb 28, 2026

✨ Files requiring CODEOWNER review ✨

🔑 @MetaMask/accounts-engineers (2 files, +125 -32)
  • 📁 ui/
    • 📁 pages/
      • 📁 multichain-accounts/
        • 📁 multichain-accounts-connect-page/
          • 📄 multichain-accounts-connect-page.test.tsx +5 -3
          • 📄 multichain-accounts-connect-page.tsx +120 -29

👨‍🔧 @MetaMask/core-extension-ux (1 files, +2 -1)
  • 📁 ui/
    • 📁 components/
      • 📁 multichain/
        • 📁 notifications-tag-counter/
          • 📄 notifications-tag-counter.tsx +2 -1

🔔 @MetaMask/notifications (1 files, +2 -1)
  • 📁 ui/
    • 📁 components/
      • 📁 multichain/
        • 📁 notifications-tag-counter/
          • 📄 notifications-tag-counter.tsx +2 -1

🧪 @MetaMask/qa (1 files, +19 -4)
  • 📁 test/
    • 📁 e2e/
      • 📁 page-objects/
        • 📁 pages/
          • 📄 header-navbar.ts +19 -4

👨‍🔧 @MetaMask/wallet-integrations (2 files, +242 -61)
  • 📁 app/
    • 📁 scripts/
      • 📁 lib/
        • 📁 rpc-method-middleware/
          • 📁 handlers/
            • 📄 request-accounts.test.ts +122 -1
            • 📄 request-accounts.ts +120 -60

@github-actions github-actions bot added size-M and removed size-S labels Feb 28, 2026
@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Mar 1, 2026

Builds ready [2cb6290]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account365271517111483517
total365271517111483517
Confirm Txconfirm_tx6098606261392661066139
total6098606261392661066139
Bridge User Actionsbridge_load_page2622532727265272
bridge_load_asset_picker16613918417177184
bridge_search_token72470873612735736
total1157111211923111861192
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Standard HomeuiStartup14201194186411514651614
load1192100815309912331365
domContentLoaded1185100515009712291356
domInteractive281899192483
firstPaint159661168125206282
backgroundConnect21019035419210239
firstReactRender20134762133
initialActions108114
loadScripts99280913079510301162
setupStore1464271630
numNetworkReqs312293192580
Power User HomeuiStartup17251432253015317731960
load11491042172913011401470
domContentLoaded11321034164512011291440
domInteractive3320155203358
firstPaint181731540156230312
backgroundConnect29726346131303351
firstReactRender23165792442
initialActions107112
loadScripts91780914011169101231
setupStore1564251722
numNetworkReqs57381502061108
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2192172212220221
srpButtonToSrpForm90899119091
confirmSrpToPwForm21212102121
pwFormToMetricsScreen15151501515
metricsToWalletReadyScreen15151601616
doneButtonToHomeScreen631562833117565833
openAccountMenuToAccountListLoaded6982681970619570357061
total7976794080142679898014
Onboarding New WalletcreateWalletToSocialScreen2202202211221221
srpButtonToPwForm11410513310118133
createPwToRecoveryScreen989099
skipBackupToMetricsScreen37363813838
agreeButtonToOnboardingSuccess16161701617
doneButtonToAssetList828604112322410721123
total1227992152422714721524
Asset DetailsassetClickToPriceChart523774135674
total523774135674
Solana Asset DetailsassetClickToPriceChart48465224752
total48465224752
Import Srp HomeloginToHomeScreen2022197920934320182093
openAccountMenuAfterLogin42404424444
homeAfterImportWithNewWallet26122204341745428083417
total44724224487124244364871
Send TransactionsopenSendPageFromHome321944113944
selectTokenToSendFormLoaded21212202222
reviewTransactionToConfirmationPage86685588211871882
total9179139224919922
SwapopenSwapPageFromHome1168514119126141
fetchAndDisplaySwapQuotes55854569624680762446246
total57014694636879363506368
🌐 Dapp Page Load Benchmarks

Current Commit: 2cb6290 | Date: 3/1/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±39ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 732ms (±38ms) 🟢 | historical mean value: 739ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 80ms (±11ms) 🟢 | historical mean value: 83ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 39ms 1.01s 1.33s 1.08s 1.33s
domContentLoaded 732ms 38ms 707ms 1.01s 766ms 1.01s
firstPaint 80ms 11ms 64ms 172ms 88ms 172ms
firstContentfulPaint 80ms 11ms 64ms 172ms 88ms 172ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 409 Bytes (0.01%)
  • ui: 3.99 KiB (0.05%)
  • common: 28 Bytes (0%)

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Mar 1, 2026

Builds ready [9433d69]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account3283183337333333
total3283183337333333
Confirm Txconfirm_tx6032601960511260396051
total6032601960511260396051
Bridge User Actionsbridge_load_page2792732876287287
bridge_load_asset_picker18212529564206295
bridge_search_token7026987053703705
total1173110112768212711276
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Standard HomeuiStartup14181177195911614541613
load1189990166910012381349
domContentLoaded118298616279912301343
domInteractive2817105172673
firstPaint1547137869208259
backgroundConnect21219131719215257
firstReactRender19133752030
initialActions1010124
loadScripts98679914179510211147
setupStore1476291725
numNetworkReqs312292192284
Power User HomeuiStartup17931477271918518472128
load12021067204114811981557
domContentLoaded11861053203314111811518
domInteractive3518153173866
firstPaint185831179126248322
backgroundConnect30826642427320353
firstReactRender24156272636
initialActions105113
loadScripts95984117951399491298
setupStore1894581940
numNetworkReqs57371282164119
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2202202200220220
srpButtonToSrpForm9893105497105
confirmSrpToPwForm22222312323
pwFormToMetricsScreen16151601616
metricsToWalletReadyScreen17161811818
doneButtonToHomeScreen807629984125811984
openAccountMenuToAccountListLoaded7800763178779978637877
total8970888290386990319038
Onboarding New WalletcreateWalletToSocialScreen2222202231221223
srpButtonToPwForm1171081257123125
createPwToRecoveryScreen989099
skipBackupToMetricsScreen37373703737
agreeButtonToOnboardingSuccess16161701617
doneButtonToAssetList1003650146235514001462
total14031038187135717931871
Asset DetailsassetClickToPriceChart40384114041
total40384114041
Solana Asset DetailsassetClickToPriceChart46435024650
total46435024650
Import Srp HomeloginToHomeScreen2036193321649020902164
openAccountMenuAfterLogin45444614646
homeAfterImportWithNewWallet23882083266823626302668
total44734062482427246124824
Send TransactionsopenSendPageFromHome17142021820
selectTokenToSendFormLoaded21172422224
reviewTransactionToConfirmationPage8568558592859859
total89888591713901917
SwapopenSwapPageFromHome1299816829158168
fetchAndDisplaySwapQuotes56074578638783262346387
total57364695649082464016490
🌐 Dapp Page Load Benchmarks

Current Commit: 9433d69 | Date: 3/1/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±41ms) 🟡 | historical mean value: 1.05s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 740ms (±39ms) 🟢 | historical mean value: 739ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 82ms (±11ms) 🟢 | historical mean value: 83ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 41ms 1.03s 1.36s 1.09s 1.36s
domContentLoaded 740ms 39ms 716ms 1.03s 769ms 1.03s
firstPaint 82ms 11ms 64ms 180ms 88ms 180ms
firstContentfulPaint 82ms 11ms 64ms 180ms 88ms 180ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 510 Bytes (0.01%)
  • ui: 4.48 KiB (0.05%)
  • common: 28 Bytes (0%)

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 1, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
47.5% Coverage on New Code (required ≥ 80%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size-L team-extension-platform Extension Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants